<? /* license

BilugCMS (http://www.bilug.it) - Content Management System for dynamic web sites
Copyright (C) 2005-2008  Federico Villa and Alessio Loro Piana

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.

For reference, contact bilugcms@vilnet.it


license */ ?>
<?
require_once("auth.php");
$id = $_GET['id'];
$argo = $_GET['argo'];
$dir = '../gals/'.$argo.'/'.$id.'/';

$errore=null;
$errore=$_GET["errore"];
$tipoerr=$_GET["tipoerr"];
if($errore=="si")
{
		echo "<h1><img src=\"./img/alert.png\" id=\"ico\" />$tipoerr<img src=\"./img/alert.png\" id=\"ico\" /></h1>";
}

if (!$id)
{
	$parola=Inserisci;
	$nome=$_GET["arg"];
	$desc=$_GET["desc"];		 
	$cont=$_GET["cont"];
}
else
{
	$parola=Modifica;
	$cont = substr($id,0,strpos($id,"_"));
	if (is_numeric($cont)) $nome= substr($id,strpos($id,"_")+1);
	else 
	{
		$cont ="";
		$nome =$id;
	}  
	$nome = str_replace("_"," ",$nome);		  		
}
?>
<div class="contenitore">
<form name="modify_arggal" method="post" action="insert_gal_query.php" enctype="multipart/form-data">
	<input type="hidden" name="id" value="<?=$id?>"/>
	<input type="hidden" name="argo" value="<?=$argo?>"/>	
	<h3><?=$parola?> <?=$argo?>&raquo;Galleria:</h3>	
	<h2>Titolo</h2>Posiz. ("" per autom. o numero)<input type="text" maxlength="4" class="medio" name="cont" value="<?=$cont?>"/> <input type="text" name="arg" size="45" maxlength="50" tabindex="1" value="<?=$nome?>"/><br/>
	<h2>Descrizione</h2> <textarea name="desc" rows="6" cols="75"><?@include($dir.$id.".txt"); echo"$desc";?></textarea><br/>
	<input type="submit"  class="medio" value="<?=$parola?>"/>
	<input type="button" class="medio" name="Annulla" value="Annulla" onclick="javascript:window.location='area.php?pag=elenco_arg_gallerie.php'" />
</form>
</div>
